package com.umf.b2b.model.register;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
 * 
<p>Title:RegisterSubmer</p>  
<p>Description: ��ҵ������̻�����</p>
<p>Company: UMPAY</p>
 @author lifeng
 */
public class RegisterSubmer extends MerchantBaseRequest {

	private String notify_url;//�첽֪ͨ��ַ
	private String order_id;//*����Ψһ,�̻�ƽ̨�Լ����ɵĶ�����,֧������,Ӣ����ĸ
	private String mer_date;//*�̻�ƽ̨���ɵĽ�������
	private String sub_mer_id;//*�̻�ƽ̨���ͻ������Ψһ���
	private String sub_mer_type = "3";//*�̻����ͣ�3����ҵ�̻�����2�����幤�̻���
	private String sub_mer_name;//*���̻�����UTF-8
	private String sub_mer_alias;//*���̻�����UTF-8
	private String cert_type = "2";//*֤������,�̶�Ϊ2,(ͳһ������ô���)
	private String cert_id = "2";//*֤�պ�cert_typeΪ1: Ӫҵִ�պ��룬����Ϊ15��cert_typeΪ2:���ô���֤������Ϊ18λ
	private String legal_name;//*��������, ����CipherUtil.encrypt���ܱ���
	private String identity_id;//����֤����, ����CipherUtil.encrypt���ܱ���,��֧��18λ���֤
	private String contacts_name;//��ϵ��,����CipherUtil.encrypt���ܱ���
	private String mobile_id;//*�ֻ���
	private String email;//�����ַ
	private String address;//��ϵ��ַ
	private String url = "/register/submer";//�������
	
	private String reg_date;//ע������YYYYMMDD
	private String user_id;//�������̻����,��������ƽ̨�����ɹ����������ص����̻�Ψһ���

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public RegisterSubmer doRequest() throws Exception {
		Message<RegisterSubmer> response = UMFUtil.post(createAPIContext(), this,RegisterSubmer.class);
		MerchantBaseRequest baseResult = convertResult(response, RegisterSubmer.class);
		if(baseResult == null)
			return null;
		return (RegisterSubmer)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getOrder_id() {
		return order_id;
	}

	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}

	public String getMer_date() {
		return mer_date;
	}

	public void setMer_date(String mer_date) {
		this.mer_date = mer_date;
	}

	public String getMobile_id() {
		return mobile_id;
	}

	public void setMobile_id(String mobile_id) {
		this.mobile_id = mobile_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getReg_date() {
		return reg_date;
	}

	public void setReg_date(String reg_date) {
		this.reg_date = reg_date;
	}

	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getSub_mer_id() {
		return sub_mer_id;
	}

	public void setSub_mer_id(String sub_mer_id) {
		this.sub_mer_id = sub_mer_id;
	}

	public String getSub_mer_type() {
		return sub_mer_type;
	}

	public void setSub_mer_type(String sub_mer_type) {
		this.sub_mer_type = sub_mer_type;
	}

	public String getSub_mer_name() {
		return sub_mer_name;
	}

	public void setSub_mer_name(String sub_mer_name) {
		this.sub_mer_name = sub_mer_name;
	}

	public String getSub_mer_alias() {
		return sub_mer_alias;
	}

	public void setSub_mer_alias(String sub_mer_alias) {
		this.sub_mer_alias = sub_mer_alias;
	}

	public String getCert_id() {
		return cert_id;
	}

	public void setCert_id(String cert_id) {
		this.cert_id = cert_id;
	}

	public void setLegal_name(String legal_name) {
		this.legal_name = legal_name;
	}

	public String getIdentity_id() {
		return identity_id;
	}

	public void setIdentity_id(String identity_id) {
		this.identity_id = identity_id;
	}

	public String getContacts_name() {
		return contacts_name;
	}

	public void setContacts_name(String contacts_name) {
		this.contacts_name = contacts_name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getLegal_name() {
		return legal_name;
	}

	public String getCert_type() {
		return cert_type;
	}

	public void setCert_type(String cert_type) {
		this.cert_type = cert_type;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("RegisterSubmer [notify_url=");
		builder.append(notify_url);
		builder.append(", order_id=");
		builder.append(order_id);
		builder.append(", mer_date=");
		builder.append(mer_date);
		builder.append(", sub_mer_id=");
		builder.append(sub_mer_id);
		builder.append(", sub_mer_type=");
		builder.append(sub_mer_type);
		builder.append(", sub_mer_name=");
		builder.append(sub_mer_name);
		builder.append(", sub_mer_alias=");
		builder.append(sub_mer_alias);
		builder.append(", cert_type=");
		builder.append(cert_type);
		builder.append(", cert_id=");
		builder.append(cert_id);
		builder.append(", legal_name=");
		builder.append(legal_name);
		builder.append(", identity_id=");
		builder.append(identity_id);
		builder.append(", contacts_name=");
		builder.append(contacts_name);
		builder.append(", mobile_id=");
		builder.append(mobile_id);
		builder.append(", email=");
		builder.append(email);
		builder.append(", address=");
		builder.append(address);
		builder.append(", url=");
		builder.append(url);
		builder.append(", reg_date=");
		builder.append(reg_date);
		builder.append(", user_id=");
		builder.append(user_id);
		builder.append(", version=");
		builder.append(version);
		builder.append(", mer_id=");
		builder.append(mer_id);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}

}
